package cn.bgs.controller;
import cn.bgs.utils.Date;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * @ProjectName: bei
 * @Package: cn.bgs.controller
 * @ClassName: DateController
 * @Author: Administrator
 * @Description:
 * @Date: 2021/9/9 0009 16:27
 * @Version: 1.0
 */
@Controller
public class DateController {

    @RequestMapping("/dateHtml")
    public String dateHtml() {
        return "Date";
    }

    @RequestMapping("/Date")
    public String Date(String start, String end, Model m) {

        int dayBetweenTwoDate = Date.getDayBetweenTwoDate(start, end);
        System.out.println(dayBetweenTwoDate);
        m.addAttribute("date",dayBetweenTwoDate);
        return "Date";
    }
}


